
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets" template="/template/main.xhtml">

	<ui:define name="body">
		<h:form prependId="false" id="form">
		
			<p:fieldset style="width:98%; -webkit-border-radius: 8px; -moz-border-radius: 8px;border-radius: 8px;" legend="#{messages['filtrar']}" toggleable="true" toggleSpeed="500">	
				<h:panelGrid columns="2">

					<h:outputLabel value="#{messages['pedido.label.dataEntrega']}: " for="dataInicial" styleClass="text-input" />
					<h:panelGrid columns="5">
						<p:calendar id="dataInicial" value="#{usuarioVendedorListMB.dataInicial}"  
						   	pattern="#{messages['label.date.pattern']}" navigator="true" showButtonPanel="true"
						   	locale="#{currentLocale}" title="#{messages['pedido.alt.dataEntrega']}" />
						<p:message for="dataInicial" />
						
						<h:outputLabel value=" a " for="dataFinal" styleClass="text-input" />
						<p:calendar id="dataFinal" value="#{usuarioVendedorListMB.dataFinal}"  
						   	pattern="#{messages['label.date.pattern']}" navigator="true" showButtonPanel="true"
						   	locale="#{currentLocale}" title="#{messages['pedido.alt.dataFinal']}" />
						<p:message for="dataFinal" />
						
					</h:panelGrid>
				</h:panelGrid>

				<p:commandButton value="#{messages['button.pesquisar']}" ajax="true" update="list" actionListener="#{usuarioVendedorListMB.filtrar}">
				</p:commandButton>
			</p:fieldset>

			<br/>
			<br/>

			<p:fieldset style="width:98%; -webkit-border-radius: 8px; -moz-border-radius: 8px;border-radius: 8px;" legend="Listagem dos Usuários" toggleable="true" toggleSpeed="500" id="fieldset">	
					<div style="overflow: auto; width: 100%; height: 600;"> <p:dataTable id="list" var="bean" value="#{usuarioVendedorListMB.resultList}">
						
						<p:column style="width:5%;font-size:12;" sortBy="#{bean.nome}">
							<f:facet name="header">Usuário</f:facet>
							<h:outputText value="#{bean.nome}" />
						</p:column>
		
						<p:column style="font-size:12;" sortBy="#{bean.quantidade}">
							<f:facet name="header">Quantidade de Vendas</f:facet>
								<h:outputText value="#{bean.quantidade}" />
						</p:column>
		
						<p:column style="font-size:12;" sortBy="#{bean.valorTotal}">
							<f:facet name="header">Valor</f:facet>
								<h:outputText value="#{bean.valorTotal}" converter="bigDecimalConversor"/>
						</p:column>
					</p:dataTable></div>

			</p:fieldset>

			
		</h:form>

	</ui:define>
</ui:composition>